package se.lnu.axez.animation;

public class AccelerateDecelerateInterpolator implements Interpolator {
	private static final AccelerateDecelerateInterpolator SINGLETONE = new AccelerateDecelerateInterpolator();
	
	public static AccelerateDecelerateInterpolator newInstance() {
		return SINGLETONE;
	}
	
	private AccelerateDecelerateInterpolator() {
	}
	
    public float getInterpolation(float input) {
        return (float)(Math.cos((input + 1) * Math.PI) / 2.0f) + 0.5f;
    }
}
